/*
* 注释：
* 1.活动入口模型
* */

/*
* 2.添加字段
*  / /String moreUrl String NonNull
* / /CommonModel bigCard1 Object NonNull/ /
* CommonModel bigCard2 0bject NonNull/ /
* CommonModel smallCard1 0bject NonNull/ /
* CommonModel smallcard2 0bject NonNull/
* CommonModel smallcard3 0bject NonNull//
* CommonModel smallCard4 0bject
* */
import 'common_model.dart';

class SalesBoxModel {

  final String icon;
  final String moreUrl;
  final CommonModel bigCard1;
  final CommonModel bigCard2;
  final CommonModel smallCard1;
  final CommonModel smallCard2;
  final CommonModel smallCard3;
  final CommonModel smallCard4;

//3.实现构造
  SalesBoxModel(
      {required this.icon,
      required this.moreUrl,
      required this.bigCard1,
      required this.bigCard2,
      required this.smallCard1,
      required this.smallCard2,
      required this.smallCard3,
      required this.smallCard4});

  //4.创建工厂方法
  factory SalesBoxModel.fromJson(Map<String, dynamic> json) {
    return SalesBoxModel(
      icon: json['icon'],
      moreUrl: json['moreUrl'],
      bigCard1: CommonModel.fromJson(json['bigCard1']),
      bigCard2: CommonModel.fromJson(json['bigCard2']),
      smallCard1: CommonModel.fromJson(json['smallCard1']),
      smallCard2: CommonModel.fromJson(json['smallCard2']),
      smallCard3: CommonModel.fromJson(json['smallCard3']),
      smallCard4: CommonModel.fromJson(json['smallCard4']),
    );
  }
}
